<?php
/*
* Copyright (c) 2010 by Cediti
*
* You may distribute under the terms of either the GNU Lesser General
* Public License or the new BSD License, as specified in the README file.
*/
// version :    22/04/2010

/**
 * The Repository Services (getRepositories, getRepositoryInfo, getTypeChildren,
 * getTypeDescendants, getTypeDefinition) are used to discover information about
 * the repository, including information about the repository and the object-types
 * defined for the repository
 * 
 */
interface Cmis_Services_Protocol_Repository extends Cmis_Services_Protocol_Interface
{
	/**
	 * Returns a list of CMIS repositories available from this CMIS service
	 * endpoint.
	 *
	 * Return A list of repository information, with (at least) the following
	 * information for each entry :
	 * 	ID repositoryId : The identifier for the Repository.
	 * 	String repositoryName : A display name for the Repository.
	 *
	 * @param string $endpoint CMIS Service Endpoint (the starting URL for a repository)
	 * @return Cmis_Http_Response
	 */
	public function getRepositories($endpoint);

	/**
	 * Returns information about the CMIS repository, the optional capabilities
	 * it supports and its Access Control information if applicable.
	 *
	 * The cmisRepositoryInfoType schema describes the markup that will be includeding
	 * all CMIS protocol bindings to implement this service.
	 * @param Cmis_Repository_Id $repositoryId The identifier for the Repository
	 * @return Cmis_Http_Response
	 */
	public function getRepositoryInfo(Cmis_Repository_Id $repositoryId);

	/**
	 * Returns the list of Object-Types  defined for the Repository that are
	 * children of the specified Type.
	 *
	 * @param Cmis_Repository_Id $repositoryId The identifier for the Repository
	 * @param string $typeId of an Object-Type specified in the Repository.
	 * @param bool $includePropertyDefinitions
	 * @param int $maxItems
	 * @param int $skipCount
	 * @return Cmis_Http_Response
	 */
	public function getTypeChildren(Cmis_Repository_Id $repositoryId, $typeId = null, $includePropertyDefinitions = false, $maxItems = null, $skipCount = null);

	/**
	 * Returns the set of descendant Object-Types  defined for the Repository under the specified Type.
	 *
	 * @param Cmis_Repository_Id $repositoryId The identifier for the Repository
	 * @param string $typeId of an Object-Type specified in the Repository.
	 * @param int $depth
	 * @param bool $includePropertyDefinitions
	 * @return Cmis_Http_Response
	 */
	public function getTypeDescendants(Cmis_Repository_Id $repositoryId, $typeId = null, $depth = null, $includePropertyDefinitions = false);

	/**
	 * Gets the definition of the specified Object-Type.
	 * Return Object-type including all property definitions
	 *
	 * @param Cmis_Repository_Id $repositoryId The identifier for the Repository
	 * @param string $typeId The typeId of an Object-Type specified in the Repository.
	 * @return Cmis_Http_Response
	 */
	public function getTypeDefinition(Cmis_Repository_Id $repositoryId, $typeId);
}

# EOF
